package com.zhe.zheblogmaster.config;

import java.util.HashMap;
import java.util.Map;

/**
 * 声明项目中使用的常量
 *
 * @author WHAOU
 * @date 2021/8/22
 * @email whaou@qq.com
 */
public class BlogConstants {

    /**
     * 获取项目根目录
     */
    public static final String ROOT = System.getProperty("user.dir");
    public static final String VERIFY_CODE = "verifyCode";

    public static final Map<String, String> CONFIG_MAP = new HashMap<>(7);
    public static final String EXCEPTION_MESSAGE = "exceptionMsg";
    public static final String FEEDBACK_SUCCESS = "SUCCESS";
    public static final String FILE_UPLOAD_DIC = "/editormd/upload/";
    public static final String MD_IMAGE_URL = "/md/upload/";

    static {
        CONFIG_MAP.put("yourName", "coder");
        CONFIG_MAP.put("yourEmail", "info@qq.com");
        CONFIG_MAP.put("yourAvatar", "/customize/config/avatar.jpg");
        CONFIG_MAP.put("websiteName", "ZHE BLOG");
        CONFIG_MAP.put("websiteIcon", "/customize/config/websiteIcon.png");
        CONFIG_MAP.put("websiteDescription", "SpringBoot2+Thymeleaf+Mybatis建造的个人博客网站.SpringBoot实战博客源码.个人博客搭建");
        CONFIG_MAP.put("footerICP", "京ICP备13018369号");
    }

    /**
     * 博客查询结果
     */
    public static final String BLOG_PAGE_RESULT = "blogPageResult";
    /**
     * 分页插件 默认每页项目数
     */
    public static final Integer DEFAULT_PAGE_SIZE = 11;

    /**
     * 博客状态 0-草稿 1-已发布
     */
    public static final String BLOG_STATUS = "blogStatus";

    /**
     * 博客状态：草稿
     */
    public static final Integer BLOG_STATUS_UNPUBLISHED = 0;

    /**
     * 博客状态：已发布
     */
    public static final Integer BLOG_STATUS_PUBLISHED = 1;

    /**
     * 默认博客分类名称
     */
    public static final String DEFAULT_BLOG_CATEGORY_NAME = "默认分类";

    /**
     * 默认博客分类id
     */
    public static final Integer DEFAULT_BLOG_CATEGORY_ID = 0;

    /**
     * 默认博客分类图标
     */
    public static final String DEFAULT_BLOG_CATEGORY_ICON = "/customize/category/00.png";

    /**
     * 页面标题
     */
    public static final String TITLE = "pageName";
    /**
     * 配置信息
     */
    public static final String CONFIGURATIONS = "configurations";
    public static final String LATEST_BLOG_RECORDS = "newBlogs";
    public static final int LIMIT = 9;
    public static final String HOT_BLOGS = "hotBlogs";
    public static final String KEYWORD = "keyword";
    public static final String CATEGORIES = "categories";
    public static final String BLOG_DETAIL_VO = "blogDetailVO";
}
